#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#include <map>

#include "ManagerBase.h"

class GameState;

class StateManager : ManagerBase
{
public:
	struct GameStates
	{
		enum Value
		{
			STATE_MENU,
			STATE_PLAYING,
			STATE_POSTGAME
		};
	};

public:
	StateManager();
	~StateManager();

	void Setup();

	void SetState(GameStates::Value state);

	void Tick(float DeltaTime);
	void OnInput(sf::Event::KeyEvent* pKeyEvent, bool keyDown);

private:
	GameState* GetActiveState();

	GameStates::Value m_activeState;

	std::map<GameStates::Value, GameState*> m_stateMap;
};